<ul class="sidebar-widget" id="category-module">
	<div class="title">{{ heading_title }}</div>
	{% for key, category in categories %}
		<li class="panel {{ (category.category_id == category_id and not child_id) ? 'active' : '' }}">
			<a href="{{ category.href }}" class="category-href">{{ category.name }}</a>
			{% if category.children %}
				<a class="toggle-icon" data-toggle="collapse" data-parent="#category-module" href="#category-module-{{ key }}"><i class="fa fa-angle-down" aria-hidden="true"></i></a>
				<ul id="category-module-{{ key }}" class="panel-collapse collapse {{ category.category_id == category_id ? 'in' : '' }}  ">
					{% for sub_key, child in category.children %}
						<li class="panel {{ (child.category_id == child_id and not third_child_id) ? 'active' : '' }}">
							<a href="{{ child.href }}" class="category-href">{{ child.name }}</a>
							{% if child.children %}
								<a class="toggle-icon" data-toggle="collapse" data-parent="#category-module-{{ key }}" href="#category-module-{{ key }}-{{ sub_key }}"><i class="fa fa-angle-down" aria-hidden="true"></i></a>
								<ul id="category-module-{{ key }}-{{ sub_key }}" class="panel-collapse collapse {{ child.category_id == child_id ? 'in' : '' }}  ">
									{% for third_child in child.children %}
										<li class="{{ third_child.category_id == third_child_id ? 'active' : '' }}">
											<a href="{{ third_child.href }}" class="category-href">{{ third_child.name }}</a>
										</li>
									{% endfor %}
								</ul>
							{% endif %}
						</li>
					{% endfor %}
				</ul>
			{% endif %}
		</li>
	{% endfor %}
</ul>